package com.atguigu.spzx.manager.service;

import com.alibaba.fastjson.JSON;
import com.atguigu.spzx.model.dto.system.AssginRoleDto;
import com.atguigu.spzx.model.dto.system.LoginDto;
import com.atguigu.spzx.model.dto.system.SysRoleDto;
import com.atguigu.spzx.model.dto.system.SysUserDto;
import com.atguigu.spzx.model.entity.system.SysRole;
import com.atguigu.spzx.model.entity.system.SysUser;
import com.atguigu.spzx.model.vo.system.LoginVo;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.DigestUtils;

import java.util.UUID;

/**
 * @Author: Mouoal
 * @CreateTime: 2024-11-07  11:45
 * @Version: 1.0
 */
public interface SysUserService {

    /**
     * 根据用户名查询用户数据
     * @return
     */
    public abstract LoginVo login(LoginDto loginDto) ;

    public abstract SysUser getUserInfo( String  token) ;

    public  void logout(String token);

    public abstract PageInfo<SysUser> findByPage(SysUserDto sysUserDto, Integer pageNum, Integer pageSize);


    public void saveSysUser(SysUser sysUser);


    public void updateSysUser(SysUser sysUser);


   public void deleteById(Long userId);

    @Transactional
    public void doAssign(AssginRoleDto assginRoleDto);
}
